/*
============================================================================
 Name        : Ind.h
 Author      : 王斌
 Version     :
 Copyright   : 益盟软件
 Description : CInd declaration
============================================================================
*/

#ifndef IND_H
#define IND_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>
#include "BlockPicHis.h"
class CGlobal;

//class TExp
//{
//public:
//	TBuf<20> m_strName;
//	TInt32 m_pnValue[320];
//	TInt32 m_nFirst;
//};
// CLASS DECLARATION

/**
*  CInd
* 
*/
class CInd : public CBase
{
public: // Constructors and destructor

	/**
        * Destructor.
        */
	~CInd();

        /**
        * Two-phased constructor.
        */
	static CInd* NewL(CBlockPicHis* outerPic);

        /**
        * Two-phased constructor.
        */
	static CInd* NewLC(CBlockPicHis* outerPic);

	/**
        * Constructor for performing 1st stage construction
        */
	CInd(CBlockPicHis* outerPic);

	/**
        * EPOC default constructor for performing 2nd stage construction
        */
	void ConstructL();

public:
	virtual void InitExp(const CDesCArray& pstrName);

	virtual TInt64 GetExpValue(const TInt& nDayPos,const TInt& nExpPos);

	virtual TInt GetExpFirst(const TInt& nExpPos);

	virtual TInt GetDataLength();

	virtual void WriteData(TDes8& aPtr);

	virtual TInt Value2Y(const TInt64& lValue);
	
	virtual void Draw(CFbsBitGc& g, const TInt& nFirst, const TInt& nDay);

	virtual void DrawCheck(CFbsBitGc& g, const TInt& nX, const TInt& nY, 
		const TInt& nPos, const TInt16& sFieldID);

	virtual void DrawLine(CFbsBitGc& g,const TInt& nExpPos,const TInt& nFirst, const TInt& nDay, const TRgb& nRGB);

	virtual void DrawVolume(CFbsBitGc& g,const TInt& nExpPos, const TInt& nFirst, const TInt& nDay);

	virtual void DrawStick(CFbsBitGc& g,const TInt& nExpPos,const TInt& nFirst, const TInt& nDay);

	virtual void CalcMM(const TInt& nFirst, const TInt& nDay);

	virtual void CalcMM(const TInt& nExpPos,const TInt& nFirst, const TInt& nDay);

public:
	//TExp* m_pExp;
	//TInt m_nExp;
	TInt m_nExpSize;
	TInt64 m_lMax;
	TInt64 m_lMin;
	TBool m_bCalcMM;

	TBuf<10> m_strName;
	CDesCArray* m_pstrExp;
	CBlockPicHis* p_OuterPic;
	CGlobal* m_pGlobal;
};


class CInd_MA:public CInd
{
public:
	/**
	* Destructor.
	*/
	~CInd_MA();

	/**
	* Two-phased constructor.
	*/
	static CInd_MA* NewL(CBlockPicHis* outerPic);

	/**
	* Two-phased constructor.
	*/
	static CInd_MA* NewLC(CBlockPicHis* outerPic);

private:

	/**
	* Constructor for performing 1st stage construction
	*/
	CInd_MA(CBlockPicHis* outerPic);

	/**
	* EPOC default constructor for performing 2nd stage construction
	*/
	void ConstructL();

public:
	void WriteData(TDes8& aBuf);

	TInt Value2Y(const TInt64& lValue);

	virtual TInt64 GetExpValue(const TInt& nDayPos,const TInt& nExpPos);

	virtual TInt GetExpFirst(const TInt& nExpPos);
};

class CInd_VMA:public CInd
{
public:
	/**
	* Destructor.
	*/
	~CInd_VMA();

	/**
	* Two-phased constructor.
	*/
	static CInd_VMA* NewL(CBlockPicHis* outerPic);

	/**
	* Two-phased constructor.
	*/
	static CInd_VMA* NewLC(CBlockPicHis* outerPic);

private:

	/**
	* Constructor for performing 1st stage construction
	*/
	CInd_VMA(CBlockPicHis* outerPic);

	/**
	* EPOC default constructor for performing 2nd stage construction
	*/
	void ConstructL();

public:
	TInt GetDataLength();

	void WriteData(TDes8& aBuf);

	void CalcMM(const TInt& nFirst,const TInt& nDay);

	void Draw(CFbsBitGc& g, const TInt& nFirst, const TInt& nDay);
};


class CInd_MACD:public CInd
{
public:
	/**
	* Destructor.
	*/
	~CInd_MACD();

	/**
	* Two-phased constructor.
	*/
	static CInd_MACD* NewL(CBlockPicHis* outerPic);

	/**
	* Two-phased constructor.
	*/
	static CInd_MACD* NewLC(CBlockPicHis* outerPic);

private:

	/**
	* Constructor for performing 1st stage construction
	*/
	CInd_MACD(CBlockPicHis* outerPic);

	/**
	* EPOC default constructor for performing 2nd stage construction
	*/
	void ConstructL();

public:

	void WriteData(TDes8& aBuf);

	void Draw(CFbsBitGc& g, const TInt& nFirst, const TInt& nDay);
};


class CInd_KDJ:public CInd
{
public:
	/**
	* Destructor.
	*/
	~CInd_KDJ();

	/**
	* Two-phased constructor.
	*/
	static CInd_KDJ* NewL(CBlockPicHis* outerPic);

	/**
	* Two-phased constructor.
	*/
	static CInd_KDJ* NewLC(CBlockPicHis* outerPic);

private:

	/**
	* Constructor for performing 1st stage construction
	*/
	CInd_KDJ(CBlockPicHis* outerPic);

	/**
	* EPOC default constructor for performing 2nd stage construction
	*/
	void ConstructL();

public:
	void WriteData(TDes8& aBuf);

	void CalcMM(const TInt& nFirst,const TInt& nDay);
};


class CInd_RSI:public CInd
{
public:
	/**
	* Destructor.
	*/
	~CInd_RSI();

	/**
	* Two-phased constructor.
	*/
	static CInd_RSI* NewL(CBlockPicHis* outerPic);

	/**
	* Two-phased constructor.
	*/
	static CInd_RSI* NewLC(CBlockPicHis* outerPic);

private:

	/**
	* Constructor for performing 1st stage construction
	*/
	CInd_RSI(CBlockPicHis* outerPic);

	/**
	* EPOC default constructor for performing 2nd stage construction
	*/
	void ConstructL();

public:
	TInt GetDataLength();

	void WriteData(TDes8& aBuf);

	void CalcMM(const TInt& nFirst,const TInt& nDay);
};

class CInd_WR:public CInd
{
public:
	/**
	* Destructor.
	*/
	~CInd_WR();

	/**
	* Two-phased constructor.
	*/
	static CInd_WR* NewL(CBlockPicHis* outerPic);

	/**
	* Two-phased constructor.
	*/
	static CInd_WR* NewLC(CBlockPicHis* outerPic);

private:

	/**
	* Constructor for performing 1st stage construction
	*/
	CInd_WR(CBlockPicHis* outerPic);

	/**
	* EPOC default constructor for performing 2nd stage construction
	*/
	void ConstructL();

public:

	TInt GetDataLength();

	void WriteData(TDes8& aBuf);

	void CalcMM(const TInt& nFirst,const TInt& nDay);
};


class CInd_VR:public CInd
{
public:
	/**
	* Destructor.
	*/
	~CInd_VR();

	/**
	* Two-phased constructor.
	*/
	static CInd_VR* NewL(CBlockPicHis* outerPic);

	/**
	* Two-phased constructor.
	*/
	static CInd_VR* NewLC(CBlockPicHis* outerPic);

private:

	/**
	* Constructor for performing 1st stage construction
	*/
	CInd_VR(CBlockPicHis* outerPic);

	/**
	* EPOC default constructor for performing 2nd stage construction
	*/
	void ConstructL();

public:

	void WriteData(TDes8& aBuf);

	TInt GetDataLength();
};

//资金流变
class CInd_ZJLB : public CInd
{
public:
	/**
	* Destructor.
	*/
	~CInd_ZJLB();

	/**
	* Two-phased constructor.
	*/
	static CInd_ZJLB* NewL(CBlockPicHis* outerPic);

	/**
	* Two-phased constructor.
	*/
	static CInd_ZJLB* NewLC(CBlockPicHis* outerPic);

private:

	/**
	* Constructor for performing 1st stage construction
	*/
	CInd_ZJLB(CBlockPicHis* outerPic);

	/**
	* EPOC default constructor for performing 2nd stage construction
	*/
	void ConstructL();

public:

	void WriteData(TDes8& aBuf);

	TInt GetDataLength();

	void Draw(CFbsBitGc& g, const TInt& nFirst, const TInt& nDay);

	void DrawAmtStick(CFbsBitGc& g, const TInt& nExpPos, const TInt& nFirst, const TInt& nDay);

	void DrawCheck(CFbsBitGc& g, const TInt& anX, const TInt& nY, const TInt& nPos, const TInt16& sFieldID);
};

//资金博弈
class CInd_ZJBY : public CInd
{
public:
	/**
	* Destructor.
	*/
	~CInd_ZJBY();

	/**
	* Two-phased constructor.
	*/
	static CInd_ZJBY* NewL(CBlockPicHis* outerPic);

	/**
	* Two-phased constructor.
	*/
	static CInd_ZJBY* NewLC(CBlockPicHis* outerPic);

private:

	/**
	* Constructor for performing 1st stage construction
	*/
	CInd_ZJBY(CBlockPicHis* outerPic);

	/**
	* EPOC default constructor for performing 2nd stage construction
	*/
	void ConstructL();

public:

	void WriteData(TDes8& aBuf);

	TInt GetDataLength();

	void Draw(CFbsBitGc& g, const TInt& nFirst, const TInt& nDay);

	void DrawCheck(CFbsBitGc& g, const TInt& anX, const TInt& nY, const TInt& nPos, const TInt16& sFieldID);

	void CalcMM(const TInt& nFirst,const TInt& nDay);

};

//大单比率
class CInd_DDBL : public CInd
{
public:
	/**
	* Destructor.
	*/
	~CInd_DDBL();

	/**
	* Two-phased constructor.
	*/
	static CInd_DDBL* NewL(CBlockPicHis* outerPic);

	/**
	* Two-phased constructor.
	*/
	static CInd_DDBL* NewLC(CBlockPicHis* outerPic);

private:

	/**
	* Constructor for performing 1st stage construction
	*/
	CInd_DDBL(CBlockPicHis* outerPic);

	/**
	* EPOC default constructor for performing 2nd stage construction
	*/
	void ConstructL();

public:

	void WriteData(TDes8& aBuf);

	TInt GetDataLength();

	void Draw(CFbsBitGc& g, const TInt& nFirst, const TInt& nDay);

	void DrawAmtStick(CFbsBitGc& g, const TInt& nExpPos, const TInt& nFirst, const TInt& nDay);

	void DrawCheck(CFbsBitGc& g, const TInt& anX, const TInt& nY, const TInt& nPos, const TInt16& sFieldID);
};

//超级资金
class CInd_CJZJ : public CInd
{
public:
	/**
	* Destructor.
	*/
	~CInd_CJZJ();

	/**
	* Two-phased constructor.
	*/
	static CInd_CJZJ* NewL(CBlockPicHis* outerPic);

	/**
	* Two-phased constructor.
	*/
	static CInd_CJZJ* NewLC(CBlockPicHis* outerPic);

private:

	/**
	* Constructor for performing 1st stage construction
	*/
	CInd_CJZJ(CBlockPicHis* outerPic);

	/**
	* EPOC default constructor for performing 2nd stage construction
	*/
	void ConstructL();

public:

	void WriteData(TDes8& aBuf);

	TInt GetDataLength();

	void Draw(CFbsBitGc& g, const TInt& nFirst, const TInt& nDay);

	void DrawAmtStick(CFbsBitGc& g, const TInt& nExpPos, const TInt& nFirst, const TInt& nDay);

	void DrawCheck(CFbsBitGc& g, const TInt& anX, const TInt& nY, const TInt& nPos, const TInt16& sFieldID);
};

// 筹码聚散
class CInd_CMJS : public CInd
{
public:
	/**
	* Destructor.
	*/
	~CInd_CMJS();

	/**
	* Two-phased constructor.
	*/
	static CInd_CMJS* NewL(CBlockPicHis* outerPic);

	/**
	* Two-phased constructor.
	*/
	static CInd_CMJS* NewLC(CBlockPicHis* outerPic);

private:

	/**
	* Constructor for performing 1st stage construction
	*/
	CInd_CMJS(CBlockPicHis* outerPic);

	/**
	* EPOC default constructor for performing 2nd stage construction
	*/
	void ConstructL();

public:

	void WriteData(TDes8& aBuf);

	TInt GetDataLength();

	void Draw(CFbsBitGc& g, const TInt& nFirst, const TInt& nDay);

	void DrawAmtStick(CFbsBitGc& g, const TInt& nExpPos, const TInt& nFirst, const TInt& nDay);

	void DrawCheck(CFbsBitGc& g, const TInt& anX, const TInt& nY, const TInt& nPos, const TInt16& sFieldID);
};

#endif // IND_H
